<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
			<form id="myform" action="/order/insert/attr" method="post"  enctype="application/json">
				
			
				押金：<input type="text" name="message"  value="支付测试2"><br><br>
				押金：<input type="text" name="userId.id"   value="1"><br><br>
				子订单：<input type="text" name="ocb[0].guestId.idCard"  value="123456" ><br><br>
				押金：<input type="text" name="ocb[0].startTime" value="2019-06-25"><br><br>
				押金：<input type="text" name="ocb[0].endTime" value="2019-06-27"><br><br> 
				押金：<input type="text" name="ocb[0].roomtype.id" value="1"><br><br>
				
			
				<button type="submit">提交</button>
				<button id="btn" type="button">ajax提交</button>
				<button id="btn2" type="button">ajax提交2</button>
			</form>
			
			<script src="../js/jQuery-2.2.2-min.js"></script>
			<script type="text/javascript">
			$("#btn").click(function(){
			var jsonTest = {
		    
		   
		        "message": "支付测试8",
		        "userId": {
		            "id": 1
		           
		        },
		   
		        "ocb": [
		            {
		                
		                "guestId": {
		                    
		                    "idCard": "511331231231",
		                    "name": "123",
		                    "gender": "男",
		                    "status": "未入住"
		                },
		                
		                "startTime": "2019-06-25",
		                "endTime": "2019-06-28",
		                "comboId": {
		                    "id": 1
				                },
		                "roomtype": {
		                    "id": 1
		                }
		            }
		        ]
		    };
			$.ajax({
				url:"/order/insert/attr",
				type:"post",
				async:true,
				contentType:"application/json;charset=utf-8",
				data:JSON.stringify(jsonTest),
				success:function(mes){
					window.location.href="/html/index.html";
					console.info(mes);
				}
			});
		});
			</script>
</body>
</html>